
/**
 * @brief    Defines values for the initial conditions of variables used in
 * structural transient analysis.
 *
 * @version  0.1
 * @author   wuxingchuang
 * @date     2024.11.21
 *          _
 *      ___| |__   ___ _ __   __ _  ___  _ __   __ _
 *     / __| '_ \ / _ \ '_ \ / _` |/ _ \| '_ \ / _` |
 *     \__ \ | | |  __/ | | | (_| | (_) | | | | (_| |
 *     |___/_| |_|\___|_| |_|\__, |\___/|_| |_|\__, |
 *                           |___/             |___/
 * @copyright (c) 2024 by 神工仿真, All Rights Reserved.
 */
#pragma once
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Common/SetBase.h"
#include "DataStructure/Input/Solver/DOFDirections.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN

struct TICData : public SetBase
{
    SG::DataStructure::FEM::DOFDirections GetDirection () const;

    SG::DataStructure::Common::I64  m_G        = 0;    ///< Grid, scalar, or extra point identification number
    SG::DataStructure::Common::I64  m_C        = 0;    ///< Component number for point GD
    SG::DataStructure::Common::Real m_U0       = 0.0;  ///< Initial displacement
    SG::DataStructure::Common::Real m_V0       = 0.0;  ///< Initial velocity
    SG::DataStructure::Common::Id   m_domainId = 0;    ///<
};
inline SG::DataStructure::FEM::DOFDirections TICData::GetDirection () const
{
    switch (m_C)
    {
    case 1:
        return SG::DataStructure::FEM::DOF_Ux;
    case 2:
        return SG::DataStructure::FEM::DOF_Uy;
    case 3:
        return SG::DataStructure::FEM::DOF_Uz;
    case 4:
        return SG::DataStructure::FEM::DOF_Rotx;
    case 5:
        return SG::DataStructure::FEM::DOF_Roty;
    case 6:
        return SG::DataStructure::FEM::DOF_Rotz;
    default:
        return SG::DataStructure::FEM::DOF_Unknow;
    }
}

///< @brief 判断数据是否相等
DECLSPEC bool operator== (const TICData& val1, const TICData& val2);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
